import tensorflow as tf
from utils.image.input_image import get_jpeg_image
import numpy as np
import csv

jpg1=get_jpeg_image('ILSVRC2012_val_00025000.JPEG')
jpg2=get_jpeg_image('ILSVRC2012_val_00025000.JPEG')

add=tf.add(jpg1,jpg2)




with tf.Session() as sess:
    j1,j2,a=sess.run([jpg1,jpg2,add])
    b = j1[:,:,:1]
    c=j1[:,:,1:2]
    d=j1[:,:,2:3]
    print j1.shape,b.shape,c.shape
    with open('run.txt','w') as f:
        f.write(str(j1.shape)+str(b.shape)+str(c.shape)+str(d.shape)+'\n\n')
    for i in j1:
        print i
        break
    print "j1[:,:,:1] : ==>",b[0][0][0],b[0][1][0],b[0][2][0]
    print "j1[:,:,1:2]: ==>",c[0][0][0],c[0][1][0],c[0][2][0]
    print "j1[:,:,2:3]: ==>",d[0][0][0],d[0][1][0],d[0][2][0]


